#include "wifi.h"

USARTBuffer wifi_usart_buffer; // USART Buffer(串口缓冲区)
Wifi_Config wifiConfig;        // WIFI配置信息

// 初始化WIFI串口
void WIFI_USART_Init(uint32_t baudRate)
{
    // 初始化串口缓冲区
    wifi_usart_buffer.USART_TX_Index = 0;
    wifi_usart_buffer.USART_RX_Index = 0;
    wifi_usart_buffer.USART_TX_Complete = 0;
    wifi_usart_buffer.USART_RX_Complete = 0;
    wifi_usart_buffer.USART_TXFlag = 0;
    wifi_usart_buffer.USART_RXFlag = 0;
    wifi_usart_buffer.USART_TX_DataSlice = 0;
    wifi_usart_buffer.USART_RX_DataSlice = 0;

    // 初始化WIFI配置信息
    for (int i = 0; i < 3; i++)
    {
        memset(wifiConfig.severs[i], 0, WIFI_SERVER_LENGTH);
    }
    memset(wifiConfig.remotePort, 0, WIFI_PORT_LENGTH);
    memset(wifiConfig.localPort, 0, WIFI_PORT_LENGTH);
    memset(wifiConfig.tcpKeepAlive, 0, WIFI_TCP_KEEPALIVE_LENGTH);
    memset(wifiConfig.remoteIp, 0, WIFI_IP_LENGTH);
}

void depose_wifi_usart_info(void)
{
}

void build_tcp_conncet_with_ip(void)
{
}

void build_ssl_connect(void)
{
}

void disconnect_tcp_conncet(void)
{
}

void disconnect_ssl_connect(void)
{
}